package org.eclipse.gittab.fretboard.draw2d.figures;

import org.eclipse.draw2d.Ellipse;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.ToolbarLayout;

public class NoteInfoFigure extends Ellipse {

	public static final int SIZE = 18;

	private final String note;

	private final int fret;

	private final int string;

	public NoteInfoFigure(String note, int fret, int string) {

		this.note = note;
		this.fret = fret;
		this.string = string;

		// TODO: issue with showing note when hovering
		ToolbarLayout layout = new ToolbarLayout();
		// FlowLayout layout = new FlowLayout();
		setLayoutManager(layout);

		setLineWidth(0);
		setOpaque(true);
		setSize(SIZE, SIZE);
		setVisible(false);

		Label l = new Label(note);
		l.setOpaque(true);
		l.setLocation(getLocation());
		l.setVisible(true);
		add(l);
	}

	public String getNote() {
		return note;
	}

	public int getFret() {
		return fret;
	}

	public int getString() {
		return string;
	}
}
